package com.fast.controller.completableFuture;

/**
 * @author hujw
 * @since 2022/1/20
 */
public class Dish {
    private String name;
    private Integer costTime;

    public Dish(String name, Integer costTime){
        this.name = name;
        this.costTime = costTime;
    }

    public void make(){
        try {
            Thread.sleep(costTime);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println(Thread.currentThread().getName()+","+this.name+"制作完毕，快来吃吧");
    }
}
